<template>
  <view class="flex justify-center align-center" @click="onClick">
    <image :src="src" :mode="mode" :style="{ width: width }"></image>
    <text class="ml-5">{{ text }}</text>
  </view>
</template>

<script>
export default {
  props: {
    src: {
      type: String,
      default: '',
    },
    text: {
      type: String,
      default: '',
    },
    width: {
      type: String,
      default: '20rpx',
    },
    mode: {
      type: String,
      default: 'widthFix',
    },
  },
  data() {
    return {}
  },
  methods: {
    onClick() {
      this.$emit('click')
    },
  },
}
</script>

<style scoped></style>
